package com.community.admin.modules.contents;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.community.admin.modules.vo.MyPageVo;
import com.community.common.core.utils.Result;
import com.community.feign.contents.discuss.DiscussFeign;
import com.community.feign.contents.dto.DiscussDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("contents/discuss")
public class DiscussController {

    @Autowired
    private DiscussFeign discussFeign;

    @PostMapping("page")
    public Result<Page<DiscussDTO>> page(@RequestBody MyPageVo<DiscussDTO> params){
        return discussFeign.page(params);
    }

    @PostMapping
    public boolean save(@RequestBody DiscussDTO dto){
        return discussFeign.save(dto);
    }


}
